﻿<%@ Page Title="Backup &amp; Restore &raquo; ResourceBlender" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Backup.aspx.cs" Inherits="Backup" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" Runat="Server">
    <h1>Backup &amp; Restore</h1>
    <div class="niceform">
        <fieldset>
            <legend>Backup</legend>
            <strong>Include</strong>
            <div class="checks plain">
                <asp:CheckBox ID="chkBakApplications" runat="server" Text="Applications" 
                    ValidationGroup="backup" Checked="True" /><br />
                <asp:CheckBox ID="chkBakElements" runat="server" Text="Elements" 
                    ValidationGroup="backup" Checked="True" /><br />
                <asp:CheckBox ID="chkBakTranslations" runat="server" Text="Translations" 
                    ValidationGroup="backup" Checked="True" /><br />
                <asp:CheckBox ID="chkBakUsers" runat="server" Text="Users" 
                    ValidationGroup="backup" Checked="True" /><br />
                <asp:Label ID="lblNoBackupOptions" runat="server" Text="Nothing selected to backup" CssClass="block error" Visible="false"></asp:Label>
            </div>
            <div class="actions">
                <asp:Button ID="btnBackup" runat="server" Text="Backup" 
                    ValidationGroup="backup" onclick="btnBackup_Click" />
            </div>
        </fieldset>
        
        <fieldset>
            <legend>Restore</legend>
            <strong>Include</strong>
            <div class="checks plain">
                <asp:CheckBox ID="chkResApplications" runat="server" Text="Applications" 
                    ValidationGroup="restore" Checked="True" /><br />
                <asp:CheckBox ID="chkResElements" runat="server" Text="Elements" 
                    ValidationGroup="restore" Checked="True" /><br />
                <asp:CheckBox ID="chkResTranslations" runat="server" Text="Translations" 
                    ValidationGroup="restore" Checked="True" /><br />
                <asp:CheckBox ID="chkResUsers" runat="server" Text="Users" 
                    ValidationGroup="restore" Checked="True" /><br />
                <asp:Label ID="lblErrorRestore" runat="server" CssClass="block error" 
                    Visible="False"></asp:Label>
            </div>
            <asp:Label ID="lblBackupFile" runat="server" Text="File to restore" 
                CssClass="block" AssociatedControlID="uplBackupfile"></asp:Label>
            <asp:FileUpload ID="uplBackupfile" runat="server" />
            <asp:Label ID="lblNoFileSelected" runat="server" Text="You must upload a file to restore" CssClass="error" Visible="false"></asp:Label>
            <br />
            <div class="checks plain autowidth">
                <asp:CheckBox ID="chkClearDatabase" runat="server" Text="Clear database before restoring" 
                    ToolTip="This will erase the database before restoring the backup" ValidationGroup="restore" /><br />
            </div>
            <div class="actions">
                <asp:Button ID="btnRestore" runat="server" Text="Restore" 
                    ValidationGroup="restore" OnClick="btnRestore_Click" />
            </div>
            <div class="successDiv" ID="restoreSuccess" runat="server" Visible="False" style="text-align: left">
                <h2>Success</h2>
                <asp:Label ID="lblRestoreSuccess" runat="server" Text="" Visible="false"></asp:Label>
            </div>
            <div class="errorDiv" ID="restoreErrors" runat="server" Visible="False" style="text-align: left">
                <h2>Errors</h2>
                <p>Completed with errors:</p>
                <asp:BulletedList ID="lstRestoreErrors" runat="server">
                </asp:BulletedList>
            </div>
        </fieldset>
    </div>
</asp:Content>

